def func():
    print('123')
    yield 1234
    print('456')
    yield 4567
data = func()

def func():
    print('123')
    return 123
v1=func() # 123